package cn.train.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.train.dao.IVipCoderDao;
import cn.train.model.Ordertable;
import cn.train.util.SqlSessionFactoryUtil;

public class VipCoderAndPassServices {
	SqlSession session=SqlSessionFactoryUtil.getSqlSession();
	IVipCoderDao ivcd=session.getMapper(IVipCoderDao.class);
	
	public List<Ordertable> findByName(String name){
		return ivcd.findOrder(name);
	}
	public int update(String pass,int uid){
		int m=ivcd.update(pass, uid);
		session.commit();
		return m;
	}
	public int updatestate(int state,int uid){
		int m=ivcd.updatestate(uid, state);
		session.commit();
		return m;
	}
}
